N = int(input())
l1 = [0,1,2]
if N > 2:
    for i in range(2,N):
        l1.append(l1[i-1] + l1[i])
print(l1[N])
